import { BasicColumn, FormSchema } from "@/components/Table";

export const formSchema: FormSchema[] = [
    {
        field: 'id',
        label: 'ID',
        component: 'Input',
        show: false,
    },
    {
        field: 'name',
        label: '名称',
        component: 'Input',
        required: true,
    },
    {
        field: 'amount',
        label: '充值金额',
        component: 'InputNumber',
        componentProps: {
            precision: 2,
            min: 0,
            max: 100000000,
        },
        required: true,
    },
    {
        field: 'giveAmount',
        label: '赠送金额',
        component: 'InputNumber',
        componentProps: {
            precision: 2,
            min: 0,
            max: 100000000,
        },
        required: true,
    },
    {
        field: 'orders',
        label: '排序',
        component: 'InputNumber',
        componentProps: {
            min: 0,
            max: 100000000,
        },
        required: true,
    },
    {
        field: 'memo',
        label: '备注',
        component: 'InputTextArea',
    },
]

export const columns: BasicColumn[] = [
    {
        title: '名称',
        dataIndex: 'name',
        width: 200,
    },
    {
        title: '充值金额',
        dataIndex: 'amount',
        width: 120,
    },
    {
        title: '赠送金额',
        dataIndex: 'giveAmount',
        width: 120,
    },
    {
        title: '排序',
        dataIndex: 'orders',
        width: 120,
    },
    {
        title: '备注',
        dataIndex:'memo',
        width: 200,
    },
]

export const searchFormSchema: FormSchema[] = [
]